


<TITLE>pixmap - Create color images from XPM files.</TITLE>
<Center><H2>pixmap - Create color images from XPM files.</H2></Center><hr>

</pre><H3>SYNOPSIS</H3>
<B>image create pixmap </B></I>?<I>name</I></B>? ?<I>options</I></B>?
</pre><HR>

</pre><H3>DESCRIPTION</H3>
<P>
XPM is a popular X Window image file format for storing color icons.
The <B>pixmap</B></I> image type defined by the <B>Tix(n)</B></I> library can be
used to create color images using XPM files.

</pre><H3>CREATING PIXMAPS</H3>
<P>
Like all images, pixmaps are created using the <B>image create</B></I>
command. Pixmaps support the following <I>options</I></B>:
<DL>
<DT> <B>-data <I>string</I></B>
</I></B>
<DD> Specifies the contents of the source pixmap as a string.  The string
must adhere to the XPM file format (e.g., as generated by the
<B>pixmap(1)</B></I> program). If both the <B>-data</B></I> and <B>-file</B></I>
options are specified, the <B>-data</B></I> option takes precedence.
Please note that the XPM file parsing code in the xpm library is
extremely fragile. The first line of the string must be "<B>/* XPM
*/</B></I>" or otherwise a segmatation fault will be caused.
</DL>
<DL>
<DT> <B>-file <I>name</I></B>
</I></B>
<DD> <I>name</I></B> gives the name of a file whose contents define the source
pixmap.  The file must adhere to the XPM file format (e.g., as
generated by the <B>pixmap(1)</B></I> program).
</DL>
</pre><H3>IMAGE COMMAND</H3>
<P>
When a pixmap image is created, Tk also creates a new command whose
name is the same as the image.  This command may be used to invoke
various operations on the image.  It has the following general form:
<pre>
<I>imageName option </I></B>?<I>arg arg ...</I></B>?
</pre>
<I>Option</I></B> and the <I>arg</I></B>s
determine the exact behavior of the command. The following
commands are possible for pixmap images:
<DL>
<DT> <I>imageName <B>cget</B></I> <I>option</I></B>
</I></B>
<DD> Returns the current value of the configuration option given by
<I>option</I></B>. <I>Option</I></B> may have any of the values accepted by the
<B>image create pixmap</B></I> command.
</DL>
<DL>
<DT> <I>imageName <B>configure</B></I> ?<I>option</I></B>? ?<I>value option value ...</I></B>? 
</I></B>
<DD> Query or modify the configuration options for the image. If no
<I>option</I></B> is specified, returns a list describing all of the
available options for <I>imageName</I></B> (see <B>Tk_ConfigureInfo</B></I> for
information on the format of this list).  If <I>option</I></B> is specified
with no <I>value</I></B>, then the command returns a list describing the
one named option (this list will be identical to the corresponding
sublist of the value returned if no <I>option</I></B> is specified).  If
one or more <I>option-value</I></B> pairs are specified, then the command
modifies the given option(s) to have the given value(s); in this case
the command returns an empty string.  <I>Option</I></B> may have any of the
values accepted by the <B>image create pixmap</B></I> command.

</DL>
</pre><H3>KEYWORDS</H3>
pixmap(1), image(n), Tix(n)
<!Serial 851729152>
<hr><i>Last modified Fri Jan 17 23:02:31 EST 1997 </i> --- 
<i>Serial 853731307</i>
